package com.wuster.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Date;



@Data
@TableName("teacher_free")
@AllArgsConstructor
@NoArgsConstructor
public class TeacherFreeTime {
    @TableId(type = IdType.AUTO)
    Long id;
    Date dayDate;  //当天日期
    int one, two, three, four, five, six, seven, eight, nine;  //对于教师空闲表来说表示九个时间段的空闲人数


    public TeacherFreeTime(int one, int two, int three, int four, int five, int six, int seven, int eight, int nine){
        this.one = one;
        this.two = two;
        this.three = three;
        this.four = four;
        this.five = five;
        this.six = six;
        this.seven = seven;
        this.eight = eight;
        this.nine = nine;
    }

    // 更新当天的空闲人数
    public void setFreePeople(int one, int two, int three, int four, int five, int six, int seven, int eight, int nine){
        this.one += one;
        this.two += two;
        this.three += three;
        this.four += four;
        this.five += five;
        this.six += six;
        this.seven += seven;
        this.eight += eight;
        this.nine += nine;
    }

}
